package com.ruoyi.law.factory.inter.impl;

import com.ruoyi.law.annotation.ReturnStrategy;
import com.ruoyi.law.enums.ReturnStrategyEnum;
import com.ruoyi.law.factory.inter.DataHandler;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 返回上次执行的结果
 *
 * @author lie
 * @date 2023/11/15
 */
@ReturnStrategy(returnStrategy = ReturnStrategyEnum.LAST_RESULT)
@Service
public class LastStrategyHandler implements DataHandler {


    @Override
    public Object handleData(Map<String, Object> params) {
        return params.get("value");
    }
}
